package com.heima.pojo;
//返回值类
public class Result {
    private boolean flag; //操作成功、失败
    private String message; //成功、失败后的提示消息
    private Object result;  //查询时返回的数据


    //增删改和失败时调用的构造 不需要返回数据
    public Result(boolean flag, String message) {
        this.flag = flag;
        this.message = message;
    }
    //查询时调用的构造 需要返回数据
    public Result(boolean flag, String message, Object result) {
        this.flag = flag;
        this.message = message;
        this.result = result;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
